package org.lmw.note.adapter;

import org.lmw.note.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class LogAdapter extends BaseAdapter {
	LayoutInflater inflater;
	int[] colors={R.color.holo_green_light,R.color.holo_blue_light,R.color.holo_orange_light,R.color.holo_red_light,R.color.holo_purple};
	public LogAdapter(Context c) {
		inflater=LayoutInflater.from(c);
	}

	@Override
	public int getCount() {
		return 10;
	}

	@Override
	public Object getItem(int arg0) {
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		return 0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		View v=inflater.inflate(R.layout.item_note, null);
		v.findViewById(R.id.head).setBackgroundResource(colors[arg0%colors.length]);
//		((TextView)v.findViewById(R.id.text)).setText(n.getText());
//		((TextView)v.findViewById(R.id.date)).setText(n.getCreateTime());
		return v;
	}

}
